<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>搜索结果页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="Record Page">
<meta content="width=device-width, initial-scale=1" name="viewport">
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
<style type="text/css">
body {
	font-family: Microsoft YaHei;
	padding-top: 20px;
	background: #DCDCDC;
	text-align: left;
}

li {
	margin-bottom: 25px;
}

.input_btn {
	width: 666px;
	height: 50px;
	position: relative;
	margin-left: 16%;
}

#serCon {
	width: 468px;
	height: 30px;
	text-align: left;
	margin-top: 0px;
}

#search-btn {
	font-size: 16px;
	color: #d2691e;
	width: 70px;
	height: 38px;
	position: absolute;
	margin-top: -1px;
}

.content {
	background: #DCDCDC none repeat scroll 0 0;
	float: left;
	padding: 5px 0 15px 10px;
	width: 850px;
	font: 12px;
	margin: 0;
}

p {
	background: rgba(0, 0, 0, 0) url("") no-repeat scroll left center;
	line-height: 24px;
	padding-left: 12px;
	margin: 0;
}

h3 {
	padding: 10px;
	font-size: 12px;
	font-weight: normal;
	margin: 0;
}

.Sbmenu {
	background: (0, 0, 0, 0 ) url("") no-repeat scroll 0 10px;
	border-bottom: 1px solid #d8d8d8;
	color: #606060;
	line-height: 25px;
	padding-left: 10px;
	width: 900px;
	font-size: 12px;
}

.Sbmenu span {
	color: #0d1a8a;
}

a {
	text-decoration: none;
}

.page {
	font-size: 12px;
	margin-left: 0;
	padding-bottom: 30px;
	width: 628px;
	border: 0;
}

.page a,.page span {
	display: block;
	float: left;
	height: 1.7em;
	line-height: 1.7em;
	margin: 0 0.2em;
	text-align: center;
	text-decoration: none;
	width: 2em;
}

.page a.prev-page,.page a.next-page {
	width: 4em;
}

.page a .first-page,.page a .last-page {
	width: 3em;
}

tbody {
	display: none;
}

.form-control {
	font-size: 18px;
}
</style>
</head>
<body>

<%
	String domain = request.getScheme() + "://" + request.getServerName();
	
 %>
	<div class="input_btn">
		<form action="${contextPath}/search" method="post" id="search" name="search" role="form" class="form-signin">
			<input type="text" id="serCon" name="serCon" value="${result.serCon}" class="form-control" value="${serCon}">
			<button id="search-btn" type="button" class="btn btn-primary">搜索</button>
			<br>
			<input id="currentPage" type="hidden" name="currentPage" value="${result.currentPage}">
			<input id="hidserCon" type="hidden"  value="${result.serCon}">
		</form>
	</div>
	<div class="content">
		<div class="Sbmenu">
			<span> 查询结果： </span><p id = "totle">检索到记录${result.total}条</p>
		</div>
		<div class="" id="result_list">
			<table>
					<thead>
						<tr>
							<th width='4%'>序号</th>
							<th width='12%'>等级</th>
							<th width='15%'>url</th>
							<th width='15%'>Md5url</th>
							<th width='10%'>处理状态</th>
							<th width='10%'>类型</th>
						</tr>
					</thead>
					<tbody id = "record-tbody"></tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			$.ajax({
				type:'POST',
				
				url:'${contextPath}/record/getRecord', 
				dataType:'json',
				success:function(data){
						pageTotal = data.totle; 
						$.each(data.list,function(i,item){
							$("#record-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.leve+"</td>"+
								"<td>"+item.url+"</td>"+
								"<td>"+item.md5url  +"</td>"+
								"<td>"+item.result+"</td>"+
								"<td>"+item.type+"</td>"+
							"</tr>"
							);		
						});
					}
			});
		
		});
	</script>
</body>
</html>
